#ifndef NPLAYMASK_H
#define NPLAYMASK_H
#include <QtWidgets>
#include "solar/beacon/Field.h"

typedef enum{
    PlayButton,
    PriviousButton,
    NextButton
}MaskType;

typedef enum {
    UnDecide,
    DecideFalse,
    DecideTrue,
}PlayerDecide;

class NPlayMask : public QLabel {

    Q_OBJECT

public:
    NPlayMask(MaskType Type = MaskType::PlayButton,
              int PolygonSize = 40,
              int LinearSize = 10,
              QColor EntercolorForround = QColor(qRgb(219,232,252)),
              QColor LeavecolorForround = QColor(qRgb(153,170,209)),
              QColor EntercolorForshape = QColor(qRgb(236,131,124)),
              QColor LeavecolorForshape = QColor(qRgb(49,49,49)),
              QWidget *parent = nullptr);

    NPlayMask(MaskType Type = MaskType::PlayButton,
              int PolygonSize = 40,
              int LinearSize = 10,
              QColor EntercolorForshape = QColor(qRgb(236,131,124)),
              QColor LeavecolorForshape = QColor(qRgb(49,49,49)),
              QWidget *parent = nullptr);

    void d_roundet_color(QColor color);

    void d_roundlv_color(QColor color);

    void d_graphet_color(QColor color);

    void d_graphlv_color(QColor color);

    void d_polygon_size(int size);

    void d_linear_size(int size);

    void enterEvent(QEnterEvent *event);

    void leaveEvent(QEvent *Event);

    void mousePressEvent(QMouseEvent *Event);

    void mouseReleaseEvent(QMouseEvent *Event);

    void resizeEvent(QResizeEvent *Event);

    void setExtraPree(PlayerDecide Decide = PlayerDecide::UnDecide);

    void paintEvent(QPaintEvent *Event);


private:
    KEY_ATTRIBUTE RPLKEY;
    QMap<QString, QColor> RdoMap_Color;
    QMap<QString, int> RdoMap_Integet;
    QMap<QString, bool> RdoMap_Bool;
    QMap<QString, MaskType> RdoMap_MaskType;

signals:
    void msev_pre();
    void msev_rls();

};

#endif // NPLAYMASK_H
